<?php defined('IN_ADMIN') or exit('No permission resources.'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>融合易后台登录页面</title>

<link rel="stylesheet" href="<?php echo CSS_PATH?>login.css" type="text/css" />
	<script language="JavaScript">
		<!--
		if(top!=self)
			if(self!=top) top.location=self.location;
		//-->

		//表单验证
		function checkSubmit(){
			var userName = document.getElementById("userName").value;
			var passWord = document.getElementById("passWord").value;
			if( userName == "" || userName == "用户名"){
				alert("用户名不能为空");
				return false;
			}
			if( passWord == ""){
				alert("密码不能为空");
				return false;
			}
			
			document.getElementById("form_login").submit();
		}	
	</script>
</head>

<body onload="javascript:document.myform.username.focus();">

<div id="login_wrap" >
	<div class="logo">
		<p>全球领先的互联网应用服务一站式供应商</p>
		<a href="#">
			<img src="<?php echo IMG_PATH?>admin_img/logo.gif"  alt="logo"/>
			<img src ="<?php echo IMG_PATH?>admin_img/rhy.gif" alt = "融合易"  />
		</a>			
	</div>
	<h4>管理员登录</h4>
	<form  id="form_login" action="index.php?m=admin&c=index&a=login&dosubmit=1" method="post" name="myform" >
		<ul>
			<li class="firstLi">				
				<input id="userName" type="text" value="用户名" name="username" />
			</li>
			<li class="sec_li">				
				<input id="passWord" type="password" value="" name="password" />
			</li>
			<div tabindex="10" hidefocus="true" id="text_pwd">密 码</div>
		</ul>
		<!--<p id="result">用户名或密码错误!</p>-->
		<input id="logo_submit" type="button" value="登 陆" onclick="return checkSubmit();" />		
	</form>
	<div id="returnIndex">
		<a href="#" >返回首页</a>
	</div>  
</div>



<script type="text/javascript">
//登录页面JS
window.onload = function(){

	document.onkeydown=function (e){
		var evt = e || window.event;
		if(evt.keyCode==13){
			checkSubmit();
		}
	} 
	
	//用户名输入框，密码输入框获得焦点极失去焦点事件
	document.getElementById("userName").onfocus = function(){
		if(this.value == "用户名") this.value = "";
	}
	document.getElementById("passWord").onfocus = function(){
		document.getElementById("text_pwd").style.display = "none";	
	}
	
	document.getElementById("userName").onblur = function(){
		if(this.value == "") this.value = "用户名";
	}
	document.getElementById("passWord").onblur = function(){
		if(this.value == "") {
			document.getElementById("text_pwd").style.display = "block";			
		}
	}
	document.getElementById("text_pwd").onfocus = function(){
		this.style.display = "none";		
		document.getElementById("passWord").focus();
	}
		
		
	//登录按钮onmousedown,onmouseover,onmouseup,onmouseout,onclick事件
	document.getElementById("logo_submit").onmousedown = function(){
		this.style.backgroundColor = "#7d1e0f";
	}
	document.getElementById("logo_submit").onmouseout = function(){
		this.style.backgroundColor = "#fd5f46";
	}
	document.getElementById("logo_submit").onmouseover = function(){
		this.style.backgroundColor = "#e2614c";
	}
	document.getElementById("logo_submit").onmouseup = function(){
		this.style.backgroundColor = "#e2614c";	
	}

};
</script>
</body>
</html>



